﻿using System;
using System.Text;
using System.Collections;

namespace RMSM
{
    //---------------------------------------------------------------------------------------------
    public enum BoPhan
    {
        None,
        TiepDon,
        KhamBenh
    }

    public enum LoaiYLenh
    {
        None = 0,
        HTHH_CPAP = 1,
        HTHH_HFO = 2,
        HTHH_Oxy = 3,
        HTHH_ThoMay = 4,
        ThuocUong = 5,
        ThuThuat = 6,
        CLS_CT = 7,
        CLS_DienNao = 8,
        CLS_DienTim = 9,
        CLS_NoiSoi = 10,
        CLS_SieuAm = 11,
        CLS_SieuAmDM = 12,
        CLS_XetNghiem = 13,
        CLS_XQuang = 14,
        CLS_XQuangKTS = 15,
        CLS_XQuangRang = 16
    }

    public enum LoaiVienPhi
    {
        None = 0,
        HTHH_CPAP = 1,
        HTHH_HFO = 2,
        HTHH_Oxy = 3,
        HTHH_ThoMay = 4,
        ThuocUong = 5,
        ThuThuat = 6,
        CLS_CT = 7,
        CLS_DienNao = 8,
        CLS_DienTim = 9,
        CLS_NoiSoi = 10,
        CLS_SieuAm = 11,
        CLS_SieuAmDM = 12,
        CLS_XetNghiem = 13,
        CLS_XQuang = 14,
        CLS_XQuangKTS = 15,
        CLS_XQuangRang = 16,
        KhamBenh = 17
    }

    public enum LoaiDanhMuc
    {
        None,
        ChuyenKhoa = 1,
        ChucVu = 3,
        DanToc = 4,
        DoiTuongBN = 5,
        DonViBN = 6,
        QuanHamBN = 7,
        ChucVuBN = 8,
        BHYTNoiDangKy = 9,
        BHYTLoai = 10,
        BHYTDoiTuong = 11,
        LoaiXQuang = 12,
        LoaiXetNghiem = 13,
        LoaiSieuAmDongMach = 14,
        ThoMayMode = 15,
        KieuThoOxy = 16
    }

    public enum CanLamSang
    {
        None = 1000,
        CT = 0,
        DienNao = 1,
        DienTim = 2,
        NoiSoi = 3,
        SieuAm = 4,
        SieuAmDM = 5,
        XetNghiem = 6,
        XQuang = 7,
        XQuangKTS = 8,
        XQuangRang = 9
    }

    public enum LoaiThietDat
    {
        None = 0
    }

    public enum FormStatus
    {
        Add,
        Edit,
        View
    }

    //---------------------------------------------------------------------------------------------
    public class SPParam
    {
        public string orderColumn = "";
        public string orderExpression = "";
        public string whereExpression = "";
        public string otherParam = null;
        public object objParam = null;

        public SPParam()
        {
        }

        public SPParam(string orderColumn, string orderExpression, string whereExpression)
        {
            this.orderColumn = orderColumn;
            this.orderExpression = orderExpression;

            if (whereExpression == null)
                this.whereExpression = "";
            else
                this.whereExpression = whereExpression;
        }

        public SPParam(string orderColumn, string orderExpression, string whereExpression, object objParam)
        {
            this.orderColumn = orderColumn;
            this.orderExpression = orderExpression;

            if (whereExpression == null)
                this.whereExpression = "";
            else
                this.whereExpression = whereExpression;

            this.objParam = objParam;
        }
    }

    //---------------------------------------------------------------------------------------------
    public delegate void OnCompletedEventHandler(object sender, OnCompletedEventArgs e);
    public class OnCompletedEventArgs : EventArgs
    {
        public object objectID = null;
        public object objectValue = null;

        public OnCompletedEventArgs()
        {
        }

        public OnCompletedEventArgs(object objectValue)
        {
            this.objectValue = objectValue;
        }

        public OnCompletedEventArgs(object objectID, object objectValue)
        {
            this.objectID = objectID;
            this.objectValue = objectValue;
        }
    }

    //---------------------------------------------------------------------------------------------
    public delegate void OnEditEventHandler(object sender, OnEditEventArgs e);
    public class OnEditEventArgs : EventArgs
    {
        public object objectID = null;
        public object objectValue = null;

        public OnEditEventArgs()
        {
        }

        public OnEditEventArgs(object objectValue)
        {
            this.objectValue = objectValue;
        }

        public OnEditEventArgs(object objectID, object objectValue)
        {
            this.objectID = objectID;
            this.objectValue = objectValue;
        }
    }

    //---------------------------------------------------------------------------------------------
    public delegate void OnAddEventHandler(object sender, OnAddEventArgs e);
    public class OnAddEventArgs : EventArgs
    {
        public object objectID = null;
        public object objectValue = null;

        public OnAddEventArgs()
        {
        }

        public OnAddEventArgs(object objectValue)
        {
            this.objectValue = objectValue;
        }

        public OnAddEventArgs(object objectID, object objectValue)
        {
            this.objectID = objectID;
            this.objectValue = objectValue;
        }
    }
}